package user

import (
	"crmeb-common/global"
	"math/big"
)

// UserBalanceRecord 用户余额记录表
type UserBalanceRecord struct {
	global.BaseModel
	Uid int32 `json:"uid" gorm:"column=uid;comment:用户uid"`

	LinkId string `json:"linkId" gorm:"column=link_id;comment:关联id(订单号、充值单号)(system默认为0）"`

	LinkType string `json:"linkType" gorm:"column=link_type;comment:关联类型:order-订单,recharge-充值,system-系统,brokerage-佣金转余额"`

	Type int32 `json:"type" gorm:"column=type;comment:类型：1-增加，2-扣减"`

	Amount big.Float `json:"amount" gorm:"column=amount;comment:金额"`

	Balance big.Float `json:"balance" gorm:"column=balance;comment:剩余"`

	Remark string `json:"remark" gorm:"column=remark;comment:备注"`
}
